﻿@model IEnumerable<Vcare.Models.UserInfo>

<style type="text/css">
td
{
font-family: 'Trebuchet MS';
font-size: 14px;
}
th
{
font-family: 'Arial Narrow';
font-size: 16px;
color:#C0C0C0;
}
</style>

<h2>Users</h2>
<div class="spacer"></div>
<a href="@Url.Action("Create")">
<img src="../../Images/add.png" />
</a>
<div class="spacer"></div>
<table class="listtable contactstable" cellspacing="0" cellpadding="0">
    <tr>
        <th class="tableheader clickcolumn">
            @Html.DisplayNameFor(model => model.Firstname)
        </th>
        <th class="tableheader clickcolumn">
            @Html.DisplayNameFor(model => model.Surname)
        </th>
        <th class="tableheader clickcolumn">
            @Html.DisplayNameFor(model => model.CallCentreID)
        </th>
        <th class="tableheader clickcolumn">
            @Html.DisplayNameFor(model => model.Notes)
        </th>
        <th class="tableheader clickcolumn">
            @Html.DisplayNameFor(model => model.Authority.Description)
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Firstname)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Surname)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.CallCentre.CallCentre)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Notes)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Authority.Description)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.UserInfoID }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.UserInfoID })
            @if (this.User.Identity.Name==item.User.UserName)
	        {
		         @:|
                    @Html.ActionLink("Change Password", "ChangePassword", "Account")
	        }

        </td>
    </tr>
}

</table>
<div class="spacer"></div>
<div class="spacer"></div>